//
//  NSObject+Extensions.m
//  WestAir
//
//  Created by Henry on 16/8/17.
//  Copyright © 2016年 Henry. All rights reserved.
//

#import "NSObject+Extensions.h"

@implementation NSObject (Extensions)

- (BOOL)notEmpty
{
    if (self == nil) {
        return NO;
    }
    if (self == [NSNull null]) {
        return NO;
    }
    if ([NSStringFromClass(self.class) isEqualToString:@"__NSCFConstantString"]||[NSStringFromClass(self.class) isEqualToString:@"__NSCFString"]||[NSStringFromClass(self.class) isEqualToString:@"NSTaggedPointerString"]) {
        NSString *str = (NSString*)self;
        if ([str isEqualToString:@""]) {
            return NO;
        }
        if ([str isEqualToString:@"<null>"]) {
            return NO;
        }
        if ([str isEqualToString:@"(null)"]) {
            return NO;
        }
    }
    return YES;
}

@end
